<?php
/**
 * This is the administration_controller class file.
 * @author Amissah Gideon<kuulmek@yahoo.com>
 * @access public
 * @version 1.0
 */

class MessagesController extends AppController {
    # Controller Name to be used
       var $name = 'Messages';

    var $uses = array('User','Group');
    # Set the layout to use
    var $layout = 'dashboard_layout';
       
       # set the name of this module
       var $moduleName = 'Administration';

       # Check the authenticity of the user
       function  beforeFilter() {
           // parent::beforeFilter($this->moduleName);
            parent::setUpGlobalConfig();  
       }
       
       # Controller actions
       /**
        * This function displays all the users in the system
        * @name index
        * @param void
        * @return Array of data.
        * @access public
        */
       function index(){
           $userData= $this->Group->getGroupById($this->Auth->user('group_id'));
           $page_title = 'Messages';
           $this->set(compact('userData', 'page_title'));
       }

    function agenda(){
        $userData= $this->Group->getGroupById($this->Auth->user('group_id'));
        $page_title = 'Agenda';
        $this->set(compact('userData', 'page_title'));
    }

}
?>
